<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>SMValidator最简单的案例</title>
    <script src="../dist/SMValidator.min.js"></script>
</head>
<body>
    <form action="">
        <div>
            <input type="text" data-rule="required">
        </div>
        <div>
            <button type="submit">不填数据提交</button>
        </div>
    </form>
    <script>
        new SMValidator('form', {
            submit: function(valid, form) {
                if(valid) form.submit();
            }
        });
    </script>
</body>
</html>